package com.daqian.chance.common.base;

/**
 * @author daqian
 * @date 2019/7/9 15:46
 */
public abstract class BaseDTO {
    /**
     * 页码
     */
    private Integer pageNum;
    /**
     * 分页大小
     */
    private Integer pageSize;

    public Integer getPageNum() {
        return pageNum == null ? 0 : pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize == null ? 10 : pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    /**
     * 将DTO转换成实体类
     *
     * @return E
     * @author daqian
     */
    public abstract <E> E convertToEntity();
}
